import { alova } from '@/service/request';

/** get Site page */
export function paginateSite(params?: Api.SearchParams) {
  return alova.Get<Api.PageRow>('/cms/site/paginate', {
    params
  });
}

/** get all Site */
export function listSite() {
  return alova.Get<Api.Row[]>('/cms/site/list');
}

/** create Site */
export function createSite(data?: Api.Model) {
  return alova.Post<boolean>('/cms/site/create', data);
}

/** update Site */
export function updateSite(data?: Api.Model) {
  return alova.Post<boolean>('/cms/site/update', data);
}

/** delete Site */
export function deleteSite(params: Api.DeleteParams) {
  return alova.Post<boolean>('/cms/site/delete', undefined, { params });
}

/** delete Site */
export function batchDelSite(params: Api.BatchDeleteParams) {
  return alova.Post<boolean>('/cms/site/batchDel', undefined, { params });
}
